package com.springboot.demo.common.customValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author wubc683
 * @desc
 * @date 2021-09-14 15:47
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.PARAMETER})
@Constraint(validatedBy = ListNotHasNullClass.class) //这里需要指定参数校验的具体实现类
public @interface ListNotHasNull {
    String[] value() default {};

    String message() default "列表中有空元素";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}